﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CentralFoveaLib.Brain
{
    public class BayesTheorem
    {
        public static double Execute(double pA, double pBa, double pNotA)
        {
            double posterior = pA * pBa / (pA * pBa + (1 - pA) * (1 - pNotA));

            return posterior;
        }
    }

}
